home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1806 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: info.uah.edu!oreo!gbacon
  2. From: gbacon@oreo (Greg Bacon)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Program to count lines in C-source ??
  5. Date: 17 Jan 1996 01:18:36 GMT
  6. Organization: The University of Alabama in Huntsville
  7. Message-ID: <4dhipc$lb@info.uah.edu>
  8. References: <50318399@brazerko.com>
  9. Reply-To: gbacon@CS.UAH.Edu
  10. NNTP-Posting-Host: oreo.aspire.cs.uah.edu
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. brune (brune@brazerko.com) wrote:
  14. : I have used a tool called C-DOC that I think was from the Software
  15. : Blacksmiths,
  16. : Inc.  (I do not have their address).  It's cheap and counts lines of code
  17. : and
  18. : has other features.  It runs on a PC/DOS.  It is not the greatest but
  19. : handles
  20. : small files pretty good.
  21.  
  22. : Good luck!
  23. : Kevin Brune
  24.  
  25. Convention tells us that the number of semi-colons in a given source
  26. base is approximately equal to the number of lines of code.  If you're
  27. using jolly ol' UNIX, a simple 'grep -c \; *.[ch]' will do the trick
  28. (if, of course, your shell does regexp globbing).
  29.  
  30. Cheers,
  31. Greg
  32. --
  33. Greg Bacon <gbacon@cs.uah.edu>
  34. University of Alabama in Huntsville
  35. CS Department Systems Support Team
  36.